package com.young.design.pattern.future;

import java.util.concurrent.TimeUnit;

/**
 * @ClassName : RealData
 * @Author : hyy
 * @Date: 2020-03-14
 */
public class RealData implements Data {

    public void  handle() throws InterruptedException {
        System.out.println(Thread.currentThread().getName()+"\t 真事对象开始处理业务程序");
        // 模拟很慢的业务程序
        TimeUnit.SECONDS.sleep(10);
    }

    @Override
    public String getResult(){
        return "data";
    }
}
